#ifndef __UNIT_TEST_H__
#define __UNIT_TEST_H__
#include <iostream>

#define showError(a) \
	if ((!a))\
	{\
	  std::cerr << #a;\
          std::cerr << std::endl;\
	  std::cerr << __FILE__;\
          std::cerr << std::endl;\
	  std::cerr << __LINE__;\
	  std::cerr << std::endl;\
	}\
        checkError(a);\

class UnitTest
{
protected:
  int numOk_;
  int numFail_;

  UnitTest();
  ~UnitTest();
  virtual void test() = 0;
  void checkError(bool a);
public:
  void testReport() const;
};


#endif
